module SOD
  
  class PointArrayObserver < Sketchup::EntityObserver
    
    def onChangeEntity(entity)
      puts entity
      
      checkIfRectangle
    end
    
    def onEraseEntity(entity)
      
    end
    
    def checkIfRectangle(entity)
      rectangle = false
      puts vec1 = entity[0] - entity[1]
      puts vec2 = entity[1] - entity[2]
      puts vec3 = entity[2] - entity[3]
      puts vec4 = entity[3] - entity[0]
      
      
    end
    
  end
end
